#include <iostream>
#include <stdio.h>
#include <string.h> 
#include <string>
#include <stdlib.h>  
using namespace std;

/* run this program using the console pauser or add your own getch, system("pause") or input loop */
class Game{
	public:
		int number;
	Game(int newNumber){
		number = newNumber;
	}
	int getNumber(){
		return number;
	}
	string GameWin(){
		return "you are win";	
	}
	string tooBig(){
		return "too big";	
	}
	string tooSmall(){
		return "too small";	
	}
	string GameOver(){
		return "game over";
	}
};

int main() {
	string inputName;
	int randNumber;
	int inputNumber;
	int i=0;
	string name = "yilisha_andrea";
	cout<<"please input your name:"<<endl;
    cin>>inputName;
    
	if(inputName==name){
    	
		cout<<"hello this is yilisha_andrea's world"<<endl;
		randNumber=(rand() % (10-1+1))+ 1;
		//cout<<randNumber<<endl;
		cout<<"please input a number(1-10):"<<endl;
		do{
			cin>>inputNumber;
			Game game(inputNumber);
			
			if(game.getNumber()>randNumber){
				cout<<game.tooBig()<<endl;
				cout<<"do you want to try again?(yes or no)"<<endl;
				string tryAgain;
				cin>>tryAgain;
				if(tryAgain=="yes"){
					i=1;
				}
				if(tryAgain=="no"){
					cout<<game.GameOver()<<endl;
					i=0;
				} 
			}
			if(game.getNumber()<randNumber){
				cout<<game.tooSmall()<<endl;
				cout<<"do you want to try again?(yes or no)"<<endl;
				string tryAgain;
				cin>>tryAgain;
				if(tryAgain=="yes"){
					i=1;
				}
				if(tryAgain=="no"){
					cout<<game.GameOver()<<endl;
					i=0;
				} 
			}
			if(game.getNumber()==randNumber){
				cout<<game.GameWin()<<endl;
				i=0;
			}
		}while(i!=0);  
	}
	return 0;
}
	
